package com.hyh.main;

import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.Icon;
import javax.swing.JFrame;
import javax.swing.JLabel;

import com.hyh.proxy.virtual.ImageProxy;

public class ImageProxyTestDrive {

	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.setSize(1500, 1000);
		URL url = null;
		try {
			url = new URL("https://img-blog.csdnimg.cn/20190323161159133.png");
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
		Icon imageIcon = new ImageProxy(url);
		JLabel jLabel = new JLabel(imageIcon);
		frame.add(jLabel);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
	}

}
